package net.zhengxinyun.performance.service.indicators;

import net.zhengxinyun.performance.dto.ExcelDTO;
import net.zhengxinyun.performance.dto.TownDTO;
import net.zhengxinyun.performance.entity.TownEntity;
import net.zhengxinyun.performance.entity.TownIndicatorsEntity;
import net.zhengxinyun.performance.entity.UserEntity;
import net.zhengxinyun.performance.filter.IndexFilter;
import net.zhengxinyun.performance.filter.TownIndicatorsFilter;
import net.zhengxinyun.performance.filter.UserFilter;
import org.apache.catalina.servlet4preview.http.HttpServletRequest;

import java.util.List;
import java.util.Map;

/**
 * @Auther: hyp
 * @Date: 2018/10/29 18:20
 */
public interface TownIndicatorsService {
    String delete (TownIndicatorsEntity townIndicatorsEntity);

    String update (TownIndicatorsEntity townIndicatorsEntity,List<TownEntity> townList);

    String insert (TownIndicatorsEntity townIndicatorsEntity, List<TownEntity> list);

    String ListInsert(List<TownDTO> list);

    /**
     * 查询二级指标
     * @param townIndicatorsFilter
     * @return
     */
    List<Map<String,Object>> querySec (TownIndicatorsFilter townIndicatorsFilter, UserFilter userEntity);

    /**
     * 查询一级指标及其对应的二级指标
     * @param list
     * @return
     */
    List<Map<String,Object>> queryIndexMap (List<TownIndicatorsFilter> list);

    /**
     * 查询指标
     * @param townIndicatorsFilter
     * @return
     */
    List<TownIndicatorsFilter> query(TownIndicatorsFilter townIndicatorsFilter);

    /**
     * 根据查询条件求总数据量
     * @param townIndicatorsFilter
     * @return
     */
    Integer queryForCount(TownIndicatorsFilter townIndicatorsFilter);

    /**
     * 设置上级指标id
     * @param townIndicatorsEntity
     * @return
     */
    TownIndicatorsEntity setSuperId(TownIndicatorsEntity townIndicatorsEntity);

    List<TownIndicatorsFilter> indexTown(IndexFilter indexFilter);

    List<Map<String,Object>> getIndexMap(List<TownIndicatorsFilter> list);

    TownIndicatorsEntity selectIndexById(Long id);

    String getIndexByDatetime(String datetime,String indexType);


    /**
     *
     */
    int saveExcelDate(List<ExcelDTO> list , String datetime);

}
